//
//  AboutViewController.m
//  囧途
//
//  Created by fly on 16/3/3.
//  Copyright © 2016年 fly. All rights reserved.
//

#import "AboutViewController.h"
#import <AVUser.h>
@interface AboutViewController ()

@property (strong, nonatomic) IBOutlet UIButton *quiteButton;
@end

@implementation AboutViewController

- (void)viewDidLoad {
    [super viewDidLoad];
   
}

- (IBAction)quiteButtonPressed:(UIButton *)sender {
    
    [AVUser logOut];
    
    UIAlertController * alert = [UIAlertController alertControllerWithTitle:@"提示" message:@"注销成功！" preferredStyle:UIAlertControllerStyleAlert];
    
    
    
    UIAlertAction * alertAction =[UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        
        [self.navigationController popToRootViewControllerAnimated:YES];
        
    }];
    
    [alert addAction:alertAction];
    
    
    
    [self presentViewController:alert animated:YES completion:nil];
}
@end
